(function ($, window, document, undefined) {

$(document).ready(function() {
	
	$klass = $.klass;
	$proto = $klass.prototype;

	
	module("Private");
	
	test("Basic tests", 9, function() {
	
		Person = $klass({
			_private: {
				init: function( privateProps, name, sex ) {
					privateProps.name = name;
					privateProps.sex = name;
				},
				getName: function( privateProps ) {
					return privateProps.name;
				},
				getSex: function( privateProps ) {
					return privateProps.sex;
				},
			}
		});
		Male = $klass(Person, {
			init: function( name ) {
				this._super( arguments, name, "M" );
			},
			_private: {
				_secure: true,
				tryToGetName: function( privateProps ) {
					return privateProps.name;
				},
				nextSecret: function( privateProps ) {
					if(privateProps.secret === undefined) privateProps.secret = 0;
					return privateProps.secret++;
				}
			}
		});
		
		strictEqual(Person._klass.privateInit, true, 'Person._klass.privateInit)');
		notEqual(Person._klass.privateSecure, true, 'Person._klass.privateSecure)');
		person = new Person("Mario", "?");
		strictEqual(person.getName(), "Mario", 'person.getName()');
		strictEqual(Male._klass.privateInit, true, 'Male._klass.privateInit)');
		strictEqual(Male._klass.privateSecure, true, 'Male._klass.privateSecure)');
		male = new Male("Adam");
		strictEqual(male.getName(), "Adam", 'male.getName()');
		strictEqual(male.tryToGetName(), undefined, 'male.tryToGetName()');
		strictEqual(male.nextSecret(), 0, 'male.nextSecret() (1)');
		strictEqual(male.nextSecret(), 1, 'male.nextSecret() (2)');
	});
});

})(jQuery, window, window.document);